<template>
  <el-row justify="center">
    <el-col :span="15">
      <h1>审批进度</h1>
      <el-table :data="progress" style="width: 100%" border header-cell-class-name="table-header"
                :default-sort="{ prop: 'node'}">
        <el-table-column prop="node" label="审批节点" :resizable="false" align="center"></el-table-column>
        <el-table-column prop="user.name" label="审批人" :resizable="false" align="center"></el-table-column>
        <el-table-column prop="date" label="审批时间" :resizable="false" align="center"></el-table-column>
        <el-table-column label="审批结果" :resizable="false" align="center">
          <template #default="scope">
            <div v-if="scope.row.result === true" class="success">
              通过
            </div>
            <div v-else-if="scope.row.result === false" class="error">
              驳回
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="detail" label="审批意见" :resizable="false" align="center"></el-table-column>
      </el-table>
    </el-col>
  </el-row>
</template>

<script>
export default {
  name: "ApproveProgress",
  props: {
    modelValue:Object
  },
  emits: ['update:modelValue'],
  data(){
    return{
    }
  },
  computed:{
    progress:{
      get() {
        return this.modelValue
      },
      set(value) {
        this.$emit('update:modelValue', value)
      }

    }
  }
}
</script>

<style scoped>

</style>